import request from "@/request"

const requestMethods = (url, data, method) => {
	return request(url, {
		method,
		data
	})
}

const rq = {
	post: (url, data) => requestMethods(url, data, 'post'),
	put: (url, data) => requestMethods(url, data, 'put'),
	get: (url, data) => requestMethods(url, data, 'get'),
	delete: (url, data) => requestMethods(url, data, 'delete'),
}

export default rq;